{
QNetworkRequest req;
+ auto fullSize = 0;
+
for(const auto &oneDevice : _devices) {
// Our rate limits in UploadDevice::readData will cause an application freeze if used here.
// QHttpMultiPart's internal QHttpMultiPartIODevice::readData will loop over and over trying
auto onePart = QHttpPart{};
+ fullSize += oneDevice._device->size();
if (oneDevice._device->size() == 0) {
onePart.setBody({});
} else {
}
req.setAttribute(QNetworkRequest::DoNotBufferUploadDataAttribute, true);
+ req.setHeader(QNetworkRequest::ContentLengthHeader, fullSize);
+
sendRequest("POST", _url, req, &_body);
if (reply()->error() != QNetworkReply::NoError) {